Introduce plugin framework and common bindings#31
Introduce plugin framework and common bindings#31tiranuom wants to merge 6 commits intofeat/introduce-plugin-systemfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a formal plugin framework by extracting shared bindings into a standalone @intrig/common (common-bindings) package, defining an IntrigPlugin interface with built-in React/Next plugins, and wiring plugin loading into the daemon generator and CLI modules.
- Extracted
GeneratorBindingtocommon-bindingsand aliased as@intrig/common - Added
IntrigPlugininterface and default exports for React/Next plugins - Updated generator and CLI modules to discover and load plugins dynamically
Reviewed Changes
Copilot reviewed 28 out of 29 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.base.json | Added paths mapping for @intrig/common |
| lib/*-binding/tsconfig.json | Injected reference to ../common-bindings |
| lib/*-binding/src/index.ts | Exported plugin objects for React and Next |
| app/intrig/src/app/plugins/builtin-plugins.ts | Populated BUILTIN_PLUGINS array |
| app/intrig/src/app/cli/cli.module.ts | Wire CLI modules/services via BUILTIN_PLUGINS |
Comments suppressed due to low confidence (7)
lib/react-binding/tsconfig.json:8
- This entry is nested inside the previous object block instead of being its own array element. It should be moved out as a separate object in the
referencesarray.
{"path": "../common-bindings"},
app/intrig/src/app/plugins/builtin-plugins.ts:1
- Update this import to
@intrig/commonto match the new package name for shared interfaces.
import {IntrigPlugin} from "common";
app/intrig/src/app/cli/cli.module.ts:8
- The
CommonModuleimport should come from@intrig/commoninstead ofcommonafter the refactoring.
import {CommonModule} from "common";
lib/next-binding/src/index.ts:8
- The imported identifier
IntrigNextBindingServicelikely mismatches the class name exported innext-binding.service.ts. Please verify and adjust the import/export names.
import {IntrigNextBindingService} from './lib/next-binding.service';
lib/react-binding/package.json:16
- Using
"*"for a dependency version is discouraged; specify a semver range (e.g.,^0.0.1) to ensure reproducible installs.
"@intrig/common": "*"
| "@intrig/common": ["lib/common-bindings/src/index.ts"], | ||
| "@intrig/common/*": ["lib/common-bindings/src/*"] |
There was a problem hiding this comment.
The path alias @intrig/common points only to common-bindings, but many imports refer to exports from lib/common. You may need to update this mapping to include the main lib/common index or adjust imports accordingly.
| "@intrig/common": ["lib/common-bindings/src/index.ts"], | |
| "@intrig/common/*": ["lib/common-bindings/src/*"] | |
| "@intrig/common": ["lib/common-bindings/src/index.ts", "lib/common/index.ts"], | |
| "@intrig/common/*": ["lib/common-bindings/src/*", "lib/common/*"] |
Summary
GeneratorBindinginto new buildable library@intrig/commonIntrigPlugininterface and builtin plugin listTesting
npx nx build common-bindings(fails: 403 Forbidden - GET https://registry.npmjs.org/nx)https://chatgpt.com/codex/tasks/task_e_68602d94b3b083298facdcfa6d0d390e